package com.web_uml.node.class_node {
    import com.web_uml.node.*;
    import flash.events.Event;
    import flash.events.MouseEvent;

    import mx.containers.Canvas;

    public class PackageNode extends Canvas implements INode {

        public function PackageNode() {
            super();
            this.addEventListener(Event.ADDED_TO_STAGE, initMe);
            this.addEventListener(MouseEvent.MOUSE_DOWN, select);
        }

        private function select(evt : MouseEvent) : void {
        }

        private function initMe(evt : Event) : void {
            this.redraw();
        }

        private function redraw() : void {
            this.graphics.clear();
            this.graphics.lineStyle(1);
            this.graphics.beginFill(0xcccccc);
            this.graphics.drawRect(0, 0, this.width / 2, 15);
            this.graphics.drawRect(0, 15, this.width, this.height - 15);
            this.graphics.endFill();
        }
    }
}